package a2022.a20221227;

/**
 * @author lenovo
 * @date 2022/12/27
 */
public class a {
    public static void main(String[] args) {
        System.out.println(minimumMoves("OOOO"));
    }

    public static int minimumMoves(String s) {
        if (!s.contains("X")) return 0;
        int num = 0, len = s.length();
        for (int i = 0; i < len; i++) {
            if (s.charAt(i) == 'X') {
                num++;
                i += 2;
            }
        }
        return num;
    }
}
